#include "logger.hpp"

FileLogger::FileLogger(std::string path)
{
	outfile.open(path, std::ios::out | std::ios::trunc);
}

FileLogger::FileLogger()
{
}

FileLogger::~FileLogger()
{
	outfile.close();
}

void FileLogger::write_line(std::vector<double> &list)
{
	outfile << std::fixed << std::setprecision(5);
	for (auto i : list)
	{
		outfile << i << " ";
	}
	outfile << std::endl;
}

void FileLogger::write_line(std::vector<std::string> &list)
{
	for (auto i : list)
	{
		outfile << i << " ";
	}
	outfile << std::endl;
}



void FileLogger::write_line(std::string str)
{
	outfile << str << std::endl;
}